<div id="result">
<?php echo $this->Session->flash();
//pr($qData);
?>
<div class="div_header1"><b>Contact With Buyer "<?php echo $qData[0]['User']['first_name'].' '.$qData[0]['User']['last_name'];?>"</b></div>
<div class="ques-popup">
<?php echo $this->Form->create('Product', array('action' => 'contact_buyer')); ?>
    <input type="hidden" value="<?php echo $qData[0]['Product']['id'];?>" name="data[Message][item]" />
    <input type="hidden" value="1" name="data[MessageTrack][msg_type]" />
<table cellpadding="5">
 <tr><td>To :</td>
<input type="hidden" value="<?php echo $qData[0]['User']['id'];?>" name="data[MessageTrack][to_id]" />
 <td><?php echo $qData[0]['User']['first_name'].' '.$qData[0]['User']['last_name'];?></td>
 </tr>
 <tr>
 <td>From  :</td>
 <input type="hidden" value="<?php echo $session->read('Auth.User.id');?>" name="data[MessageTrack][from_id]" />
 <td><?php echo $session->read('Auth.User.username');?></td>
</tr>
<tr>
 <td>Subject :</td>
 <td><input name="data[Message][subject]" class="required" size="60" />   </td>
</td>
</tr>
<tr style="padding:10px 0; border-top:1px solid; border-bottom:1px solid; margin:10px 0;">
<td>Dear <?php echo $qData[0]['User']['first_name']; ?> :</td><td></td></tr>
<tr><td colspan="2"><textarea name="data[Message][message]" class="required" rows="7" cols="65"></textarea></td></tr>
<tr><td colspan="2" align="left">Regards,<br /><?php echo $session->read('Auth.User.username'); ?></td></tr> 
<tr><td colspan="2" align="left"><input type="submit" value="Send" name="sendMessege" /></td></tr> 
</form>
</div>
</div>
<?php  echo $html->script(array("jquery.min.js","jquery.form.js","jquery.validate.js","jquery.tablednd.js"));?>
<script type="text/javascript">  
jQuery(document).ready(function(){

var v = jQuery("#ProductContactBuyerForm").validate({
	submitHandler: function(form) {
		jQuery(form).ajaxSubmit({
			target: "#result"
		});
	}
});		 
});	 
</script>